<template>
	<view class="home" :style="{'height':show?'100vh':''}">
		<view class="headertop" :style="{'background':back1}">
			<view class="topdaohang" :style="{'margin-top':statusBarHeight+'px','height':barHeight+'px'}">
				<span>企址易</span>
			</view>
		</view>

		<view class="loop">
			<up-swiper height="358" :list="list5" :autoplay="true" autoplay @change="e => current = e.current"
				@click="clickloop">
				<template #indicator>
					<view class="indicator">
						<view class="indicator__dot" v-for="(item, index) in list5" :key="index"
							:class="[index === current && 'indicator__dot--active']">
						</view>
					</view>
				</template>
			</up-swiper>
		</view>
		<view :style="{'margin-top':statusBarHeight+'px','height':barHeight+'px'}">

		</view>


		<view class="bottomcontent">
			<view class="popuback" v-show="show" @click="show=false">

			</view>
			<view
				:style="{'width':'100%','background':'#fff','overflow': 'hidden','position': 'relative','z-index':!showpopu?'99999':'0'}">
				<image src="https://jingwei.xunfuzhifuzaixian.com/static/images/Rectangle 24669@2x.png"
					class="bottomcontentback" mode="widthFix"></image>
				<view class="center" :style="{'z-index':show&&!showpopu?9999:'','position': 'relative'}">
					<view class="fenleiarr">
						<view class="itembox" @click="active=-1">
							<image src="https://jingwei.xunfuzhifuzaixian.com/static/images/Group 11855@2x.png"
								class="image1" mode=""></image>
							<view class="mkbox" v-if="active!=-1">
								<view class="mk">
									全部
								</view>
							</view>
							<view class="mkactive" v-if="active==-1">
								<image src="https://jingwei.xunfuzhifuzaixian.com/static/images/Union@2x.png"
									class="mkactiveback" mode="widthFix"></image>
								<view class="mkt">
									全部
								</view>
							</view>
						</view>
						<view class="itembox" v-for="(item,index) in classifyList" :key="index" @click="active=index">
							<image :src="item['image']" class="image1" mode=""></image>
							<view class="mkactive" v-if="active==index">
								<image src="https://jingwei.xunfuzhifuzaixian.com/static/images/Union@2x.png"
									class="mkactiveback" mode="widthFix"></image>
								<view class="mkt">
									{{item.title}}
								</view>
							</view>
							<view class="mkbox" v-else>
								<view class="mk">
									{{item.title}}
								</view>
							</view>
						</view>
					</view>
					<view class="seachbox">
						<image src="/static/images/Frame@2x.png" class="ssicon" mode=""></image>
						<input type="search" v-model="query['keywords']" cursor-spacing="100" @confirm="initlist('搜索')"
							placeholder="请输入关键词搜索" />
						<image src="https://jingwei.xunfuzhifuzaixian.com/static/images/删除(1).png" v-if="query.keywords"
							@click="qk" class="iconrem" mode="">
						</image>
					</view>
					<view class="fenleiclassify">
						<view class="flitem" @click="qb">
							<span
								:style="{'color':!query.cityid&&!query.pid&&!query['mid']&&!query['price']?'#13A2E6':''}">全部</span>
							<image src="https://jingwei.xunfuzhifuzaixian.com/static/images/微信图片_20250804100846.png"
								mode=""></image>
						</view>
						<view class="flitem" @click="poputype('区域')">
							<span :style="{'color':((show&&typestr=='区域')||query['cityid'])?'#13A2E6':''}">区域</span>
							<image
								:src="show&&typestr=='区域'?'https://jingwei.xunfuzhifuzaixian.com/static/images/wx微信图片_20250813104019.png':'https://jingwei.xunfuzhifuzaixian.com/static/images/微信图片_20250804100846.png'"
								mode=""></image>
						</view>
						<view class="flitem" @click="poputype('产品')">
							<span :style="{'color':((show&&typestr=='产品')||query['pid'])?'#13A2E6':''}">产品</span>
							<image
								:src="show&&typestr=='产品'?'https://jingwei.xunfuzhifuzaixian.com/static/images/wx微信图片_20250813104019.png':'https://jingwei.xunfuzhifuzaixian.com/static/images/微信图片_20250804100846.png'"
								mode=""></image>
						</view>
						<view class="flitem" @click="poputype('面积')">
							<span :style="{'color':((show&&typestr=='面积')||query['mid'])?'#13A2E6':''}">面积</span>
							<image
								:src="show&&typestr=='面积'?'https://jingwei.xunfuzhifuzaixian.com/static/images/wx微信图片_20250813104019.png':'https://jingwei.xunfuzhifuzaixian.com/static/images/微信图片_20250804100846.png'"
								mode=""></image>
						</view>
						<view class="flitem" @click="poputype('价格')">
							<span :style="{'color':((show&&typestr=='价格')||query['price'])?'#13A2E6':''}">价格</span>
							<image
								:src="show&&typestr=='价格'?'https://jingwei.xunfuzhifuzaixian.com/static/images/wx微信图片_20250813104019.png':'https://jingwei.xunfuzhifuzaixian.com/static/images/微信图片_20250804100846.png'"
								mode=""></image>
						</view>
					</view>
				</view>
			</view>

			<view class="xuanqunriong" v-show="typestr=='面积'&&show">
				<view class="mianjimokuai">
					<template v-for="(item,index) in mjiarr" :key="index">
						<view class="title">
							{{item['title']}}
						</view>
						<view class="activeboxs">
							<view :class="mijifun1(item.son)?'itemactivebox':'itemactivebox  activeColor1'"
								@click="qingkong(item.son)">
								全部
							</view>
							<view :class="mijifun(ite.id)?'itemactivebox  activeColor1':'itemactivebox'"
								v-for="(ite,ind) in  item['son']" :key="ind" @click="xuanze(ite['id'])">
								{{ite['title']}}
							</view>
						</view>
					</template>
				</view>
				<view class="btnss">
					<view class="btnb" @click="cz('面积')">
						重置
					</view>
					<view class="btnbb" @click="queding('面积')">
						确定
					</view>
				</view>
			</view>


			<view class="xuanqunriong" v-show="typestr=='价格'&&show">
				<view style="height: 500rpx;overflow-y: scroll;">
					<view class="mianjimokuai">
						<template v-for="(item,index) in  pricearr" :key="index">
							<view class="title">
								{{item['title']}}
							</view>
							<view class="activeboxs">
								<view :class="jiagefun1(item.son)?'itemactivebox':'itemactivebox  activeColor1'"
									@click="qingkong1(item.son)">
									全部
								</view>
								<view :class="jiagefun(ite.id)?'itemactivebox activeColor1':'itemactivebox'"
									v-for="ite in  item['son']" :key="ite.id" @click="xuanze1(ite['id'])">
									{{ite['title']}}
								</view>
							</view>
						</template>
					</view>
				</view>
				<view class="btnss">
					<view class="btnb" @click="cz('价格')">
						重置
					</view>
					<view class="btnbb" @click="queding('价格')">
						确定
					</view>
				</view>
			</view>
			<view class="xuanqunriong" v-show="typestr=='区域'&&show">
				<view class="diquboxs">
					<view class="shengs">
						<view class="sbox">
							所有省份
						</view>
						<view :class="quyuactive==index?'sbox1':'sbox' " v-for="(item,index) in  allshengarr"
							:key="item.id" @click="qiehuanshengfen(item['id'],index,'sheng')">
							{{item['name']}}
						</view>
					</view>
					<view class="shi">
						<view class="shibox">
							所有城市
						</view>
						<view :class="quyuactive1==index?'shibox1':'shibox' " v-for="(item,index) in cityList"
							:key="index" @click="qiehuanshengfen(item['id'],index,'shi')" v-if="quyuactive!=-1">
							{{item['name']}}
						</view>
						<view class="shibox" v-else>
							暂无
						</view>
					</view>
					<view class="qu">
						<view class="qubox1">
							<span style="margin-left: 40rpx;">所有区域</span>
						</view>
						<view class="qubox1" v-for="(item,index) in quList" :key="index" v-if="quyuactive1!=-1"
							@click="qiehuanshengfen(item['id'],index,'qu')">
							<span style="margin-left: 54rpx;">{{item['name']}}</span>
							<image src="https://jingwei.xunfuzhifuzaixian.com/static/images/对号.png" class="duihaoicon"
								mode="" v-if="quyuactive2==index">
							</image>
						</view>
						<view class="qubox" v-else>
							<span style="margin-left: 54rpx;">暂无</span>
						</view>
					</view>
				</view>
				<view class="btnss">
					<view class="btnb" @click="cz('区域')">
						重置
					</view>
					<view class="btnbb" @click="queding('区域')">
						确定
					</view>
				</view>
			</view>


			<view class="xuanqunriong" v-show="typestr=='产品'&&show">
				<view class="mkboxs">
					<view :class="chanpingactive==-1?'itembb activeColor':'itembb'" @click="chanpingactive=-1">
						全部
					</view>
					<view :class="chanpingactive==index?'itembb activeColor':'itembb'" @click="chanpingactive=index"
						v-for="(item,index) in fyarr" :key="index">
						{{item['title']}}
					</view>
				</view>
				<view class="btnss">
					<view class="btnb" @click="cz('产品')">
						重置
					</view>
					<view class="btnbb" @click="queding('产品')">
						确定
					</view>
				</view>
			</view>

			<view class="msgicon" v-if="!list.length">
				<image :src="_static('https://jingwei.xunfuzhifuzaixian.com/static/images/wxnone.png')" mode="widthFix">
				</image>
				<view class="msgtext">
					暂无内容
				</view>
			</view>
			<view class="center">
				<view class="contents">
					<view class="mkbox1" v-for="(item,index) in list" :key="index" @click="gopage(item)">
						<image :src="item['image']" class="imgleft" mode=""></image>
						<view class="rightcontent">
							<view class="t1">
								{{item['title']}}
							</view>
							<view class="t2">
								{{item['detail']}}
							</view>
							<view class="fenleik">
								<view class="itekuai" v-for="(ite,ind) in item.product" :key="ind">
									{{ite}}
								</view>
							</view>
							<view class="cityline">
								<image src="https://jingwei.xunfuzhifuzaixian.com/static/images/Frame@2x(2).png"
									class="smallicon" mode=""></image>
								<view class="addresst">{{item['address']}}</view>
							</view>
							<view class="jiageline">
								价格区间 <span
									style="font-weight: bold;font-size: 32rpx;color: #F53F3F;">{{item.price}}</span>
							</view>
						</view>
					</view>
				</view>
			</view>
			<view class="cc" style="height: 200rpx;">
				<up-popup :show="showpopu" mode="center" :zoom="false">
					<view class="fahez">
						<view class="xuqiutitle">
							需求登记
						</view>
						<view class="fomrs">
							<view class="inputbox">
								<view class="labltitle">
									联系人：
								</view>
								<input type="text" v-model="query1['username']" placeholder="请输入联系人名称" />
							</view>
							<view class="inputbox">
								<view class="labltitle">
									联系方式：
								</view>
								<input type="text" v-model="query1['phone']" placeholder="请输入联系方式" />
							</view>
							<view class="textsinput">
								<view class="centersm">
									<view class="xqtitle">
										需求说明：
									</view>
									<textarea name="" v-model="query1['shuoming']" placeholder="请输入需求说明" id="" cols="30"
										rows="10"></textarea>
								</view>
							</view>
							<view class="btnsss">
								<view class="qxbtn" @click="showpopu=false">
									取消
								</view>
								<view class="qdbtn" @click="xqtj">
									提交
								</view>
							</view>
						</view>
					</view>
				</up-popup>
			</view>
			<Tabbar page="/pages/PropertyListing/index"></Tabbar>
		</view>

		<drag-button @btnClick="btnClick" :isDock="true" pageurl="pages/PropertyListing/index" :existTabBar="true" />
		<userlogin ref="denglu"></userlogin>
	</view>
</template>

<script setup>
	import dragButton from "@/components/drag-button/drag-button.vue";
	import Tabbar from '@/components/tabbar.vue'
	import userlogin from '@/components/getuser/getuser.vue'
	import ulm, {
		$api
	} from '@/ulm';

	import {
		_static
	} from '@/ulm/utils/url.js'
	import {
		ref,
		onMounted,
		reactive,
		watch
	} from 'vue'
	import {
		onLoad,
		onShow,
		onPageScroll,
		onReachBottom,
		onPullDownRefresh
	} from "@dcloudio/uni-app";
	import {
		getToken,
		setToken
	} from '@/ulm/utils/auth';

	const current = ref(0)
	const active = ref(-1)
	const quyuactive = ref(-1)
	const quyuactive1 = ref(-1)
	const quyuactive2 = ref(-1)
	const chanpingactive = ref(-1)
	const mianjishuju = ref([])
	const jiageshuju = ref([])
	const denglu = ref(null)
	const statusBarHeight = ref('')
	const homeobj = ref({})
	const back1 = ref('')
	const classifyList = ref([])
	const pricearr = ref([])
	const fyarr = ref([])
	const typestr = ref('')
	const mjiarr = ref([])
	const allshengarr = ref([])
	const show = ref(false)
	const showpopu = ref(false)
	const query1 = reactive({
		username: '',
		phone: '',
		shuoming: ''
	})
	const query = reactive({
		page: 1,
		limit: 10,
		keywords: '',
		cityid: '',
		cid: '',
		pid: '',
		mid: '',
		price: '',
		is_shouye: 0
	})
	const barHeight = ref('')
	const list = ref([])
	const pidd = ref('')
	const total = ref(0)
	const cityList = ref([])
	const quList = ref([])
	watch(() => active.value, (newCount, oldCount) => {
		console.log('Count changed:', newCount, oldCount);

		quyuactive.value = -1
		quyuactive1.value = -1
		quyuactive2.value = -1
		query['cityid'] = ''
		chanpingactive.value = -1
		query.pid = ''
		mianjishuju.value = []
		jiageshuju.value = []

		if (newCount == -1) {
			query['cid'] = ''
		} else {
			query['cid'] = classifyList.value[newCount]['id']
		}
		query['page'] = 1
		list.value = []
		show.value = false
		initlist()
	});
	const list5 = ref([
		_static('https://jingwei.xunfuzhifuzaixian.com/static/images/Rectangle 24476@2x.png'),
		_static('https://jingwei.xunfuzhifuzaixian.com/static/images/Rectangle 24476@2x.png')
	]);
	onMounted(() => {
		statusBarHeight.value = uni.getSystemInfoSync().statusBarHeight
		const {
			top,
			height
		} = wx.getMenuButtonBoundingClientRect();
		barHeight.value = height ? height + (top - statusBarHeight.value) * 2 : 38;
	})
	onPullDownRefresh(() => {
		query['page'] = 1
		list.value = []
		initlist()
		setTimeout(() => {
			// 数据加载完成后停止刷新
			uni.stopPullDownRefresh();
			console.log('刷新完成');
		}, 1000);
	})
	onLoad(() => {
		classtypeinit()
		initlist()
		bannerinit()
	})
	async function bannerinit() {
		const res = await $api.bannerlist()
		if (res.code == 1) {
			homeobj.value = res.data
			list5.value = res.data.banner.map(item => item.image)
		}
	}
	onReachBottom(() => {
		if (total.value > list.value.length) {
			query.page++
			initlist()
		}
	})

	async function xqtj() {

		for (var i in query1) {
			if (!query1[i]) {
				uni.showToast({
					title: '请补充好内容提交',
					icon: 'none'
				})
				return
			}
		}
		const phoneRegex = /^1[3-9]\d{9}$/;
		if (!phoneRegex.test(query1['phone'])) {
			uni.showToast({
				title: '请输入正确联系方式',
				icon: 'none'
			})
			return
		}

		const res = await $api.xuqiuadd(query1)
		if (res.code == 1) {
			showpopu.value = false
			setTimeout(() => {
				uni.showToast({
					title: '添加成功',
					icon: 'none'
				})
			}, 500)
		} else {
			uni.showToast({
				title: res.msg,
				icon: 'none'
			})
		}
	}

	function clickloop(e) {
		uni.navigateTo({
			url: '/sub_index/index/xmdetail?id=' + homeobj.value['banner'][e]['typeid']
		})
	}

	function qb() {
		query['page'] = 1
		list.value = []
		query.cityid = ''
		query.cid = ''
		query.pid = ''
		query.mid = ''
		query.price = ''
		initlist()
	}

	function btnClick() {
		if (!getToken()) {
			denglu.value.DengLu()
			return
		}
		if (show.value) return
		console.log(123123);
		query1.username = ''
		query1.phone = ''
		query1.shuoming = ''
		showpopu.value = true
	}

	function xuanze(id) {
		var ind = mianjishuju.value.findIndex(item => item == id)
		if (ind == -1) {
			mianjishuju.value.push(id)
		} else {
			mianjishuju.value.splice(ind, 1)
		}
		console.log(mianjishuju.value, ind, '----------console.log(mianjishuju.value);');
	}

	function xuanze1(id) {
		var ind = jiageshuju.value.findIndex(item => item == id)
		if (ind == -1) {
			jiageshuju.value.push(id)
		} else {
			jiageshuju.value.splice(ind, 1)
		}
		console.log(jiageshuju.value, ind, '----------console.log(jiageshuju.value);');
	}

	function qingkong(arr) {
		for (var i in arr) {
			var ind = mianjishuju.value.findIndex(item => item == arr[i]['id'])
			if (ind != -1) {
				mianjishuju.value.splice(ind, 1)
			}
		}
	}

	function qingkong1(arr) {
		for (var i in arr) {
			var ind = jiageshuju.value.findIndex(item => item == arr[i]['id'])
			if (ind != -1) {
				jiageshuju.value.splice(ind, 1)
			}
		}
	}



	function jiagefun(id) {
		var ind = jiageshuju.value.findIndex(item => item == id)
		if (ind != -1) {
			return true
		} else {
			return false
		}
	}

	function mijifun1(arr) {
		if (!arr) return false
		var arre = []
		for (var i in arr) {
			var ind = mianjishuju.value.findIndex(item => item == arr[i]['id'])
			if (ind != -1) {
				arre.push(true)
			} else {
				arre.push(false)
			}
		}
		var arrtrue = arre.filter(item => item == true)
		if (arrtrue.length) {
			return true
		} else {
			return false
		}
	}

	function mijifun(id) {
		if (!id) return false
		var ind = mianjishuju.value.findIndex(item => item == id)
		console.log(ind, 'ind-----------------------');
		if (ind == -1) {
			return false
		} else {
			return true
		}
	}

	function jiagefun1(arr) {
		var arre = []
		for (var i in arr) {
			var ind = jiageshuju.value.findIndex(item => item == arr[i]['id'])
			if (ind != -1) {
				arre.push(true)
			} else {
				arre.push(false)
			}
		}
		var arrtrue = arre.filter(item => item == true)
		if (arrtrue.length) {
			return true
		} else {
			return false
		}
	}


	async function initlist(str) {
		if (str == '搜索') {
			query['page'] = 1
			list.value = []
		}
		const res = await $api.hoselist(query)
		if (res.code == 1) {
			list.value.push(...res.data.list)
			total.value = res.data.count
		}
	}

	function cz(str) {
		if (str == '区域') {
			quyuactive.value = -1
			quyuactive1.value = -1
			quyuactive2.value = -1
			query['cityid'] = ''
		} else if (str == '产品') {
			chanpingactive.value = -1
			query.pid = ''
		} else if (str == '面积') {
			mianjishuju.value = []
			query.mid = ''
		} else if (str == '价格') {
			jiageshuju.value = []
			query.price = ''
		}

		query['page'] = 1
		list.value = []
		initlist()
		show.value = false
	}

	function queding(str) {
		if (str == '区域') {
			if (quyuactive2.value == -1 && quyuactive1.value == -1) {
				query['cityid'] = allshengarr.value[quyuactive.value]['id']
			} else if (quyuactive2.value == -1 && quyuactive1.value != -1) {
				query['cityid'] = cityList.value[quyuactive1.value]['id']
			} else {
				query['cityid'] = quList.value[quyuactive2.value]['id']
			}

		} else if (str == '产品') {
			if (chanpingactive.value == -1) {
				query.pid = ''
			} else {
				query.pid = fyarr.value[chanpingactive.value]['id']
			}
		} else if (str == '面积') {
			query.mid = mianjishuju.value.join()
		} else if (str == '价格') {
			query.price = jiageshuju.value.join()
		}
		typestr.value = ''
		show.value = false
		query['page'] = 1
		list.value = []
		initlist()

	}

	async function qiehuanshengfen(pid, ind, str) {
		if (str == 'sheng') {
			if (quyuactive.value != ind) {
				quyuactive.value = ind
				quyuactive1.value = -1
			}
		}
		if (str == 'shi') {
			if (quyuactive1.value != ind) {
				quyuactive1.value = ind
				quyuactive2.value = -1
			}
		}
		if (str == 'qu') {
			quyuactive2.value = ind
			return
		}

		const res = await $api.allcity({
			pid
		})
		if (res.code == 1) {
			if (str == 'sheng') {
				cityList.value = res.data
			} else {
				quList.value = res.data
			}
		}
	}
	async function classtypeinit() {
		const res = await $api.classtype()
		if (res.code == 1) {
			classifyList.value = res.data
		}

		// 面积
		const res1 = await $api.areaall()
		if (res1.code == 1) {
			mjiarr.value = res1.data
		}
		// 房源产品
		const res2 = await $api.product()
		if (res2.code == 1) {
			fyarr.value = res2.data
		}
		const res3 = await $api.priceall()
		if (res3.code == 1) {
			pricearr.value = res3.data
		}
		// 区域
		const res4 = await $api.allcity()
		if (res4.code == 1) {
			allshengarr.value = res4.data
		}
	}
	onPageScroll((e) => {
		if (e.scrollTop > 100) {
			back1.value = '#CAEEFF'
		} else {
			back1.value = ''
		}
	})

	function gopage(item) {
		uni.navigateTo({
			url: '/sub_index/index/xmdetail?id=' + item.id
		})
	}

	function poputype(str) {
		typestr.value = str
		show.value = true

	}

	function qk() {
		query.keywords = ''
		query.page = 1
		list.value = []
		initlist()
	}
</script>

<style lang="scss">
	.cc {
		::v-deep .u-popup__content {
			background: none !important;
		}

		.fahez {
			width: 640rpx;
			height: 680rpx;
			background: linear-gradient(180deg, #CAEEFF 0%, #FFFFFF 17%);
			border-radius: 32rpx 32rpx 32rpx 32rpx;
			overflow: hidden;

			.xuqiutitle {
				width: 100%;
				font-family: PingFang SC, PingFang SC;
				font-weight: bold;
				font-size: 36rpx;
				color: #1D2129;
				text-align: center;
				margin-top: 36rpx;
			}

			.fomrs {
				width: 576rpx;
				margin: auto;
				margin-top: 60rpx;

				.btnsss {
					display: flex;
					justify-content: space-between;
					align-items: center;
					margin-top: 30rpx;
					width: 100%;

					.qxbtn {
						width: 270rpx;
						height: 74rpx;
						background: #F2F3F5;
						border-radius: 8rpx 8rpx 8rpx 8rpx;
						text-align: center;
						line-height: 74rpx;
						font-family: PingFang SC, PingFang SC;
						font-weight: bold;
						font-size: 28rpx;
						color: #86909C;
					}

					.qdbtn {
						width: 270rpx;
						height: 74rpx;
						background: #13A2E6;
						border-radius: 8rpx 8rpx 8rpx 8rpx;
						font-family: PingFang SC, PingFang SC;
						font-weight: bold;
						font-size: 28rpx;
						color: #FFFFFF;
						text-align: center;
						line-height: 74rpx;

					}
				}

				.textsinput {
					width: 576rpx;
					height: 172rpx;
					background: #F7F8FA;
					overflow: hidden;
					border-radius: 16rpx 16rpx 16rpx 16rpx;

					.centersm {
						width: 516rpx;
						margin: auto;
						margin-top: 24rpx;
						overflow: hidden;

						.xqtitle {
							width: 100%;
							font-family: PingFang SC, PingFang SC;
							font-weight: 500;
							font-size: 28rpx;
							color: #1D2129;
						}

						textarea {
							width: 516rpx;
							font-size: 32rpx;
							margin-top: 16rpx;
							height: 80rpx;
							font-size: 28rpx;
						}
					}
				}

				.inputbox {
					width: 576rpx;
					height: 88rpx;
					background: #F7F8FA;
					border-radius: 16rpx 16rpx 16rpx 16rpx;
					display: flex;
					align-items: center;
					justify-content: space-between;
					margin-bottom: 30rpx;

					.labltitle {
						font-family: PingFang SC, PingFang SC;
						font-weight: 500;
						font-size: 28rpx;
						color: #4E5969;
						margin-left: 30rpx;
					}

					input {
						font-family: PingFang SC, PingFang SC;
						font-weight: 400;
						font-size: 28rpx;
						color: #4E5969;
						width: 300rpx;
						text-align: right;
						margin-right: 30rpx;
					}
				}
			}
		}
	}

	input {
		width: 500rpx;
	}

	.msgicon {
		width: 608rpx;
		margin: 100rpx auto;
		overflow: hidden;

		.msgtext {
			font-family: PingFang SC, PingFang SC;
			font-weight: 400;
			font-size: 28rpx;
			color: #86909C;
			text-align: center;
			width: 100%;
			margin-top: 30rpx;
		}

		image {
			width: 608rpx;
		}
	}

	.home {
		width: 100%;
		overflow: hidden;
		position: relative;

		.popuback {
			width: 100%;
			height: 100vh;
			background: rgba(0, 0, 0, 0.4);
			position: absolute;
			z-index: 99999;
		}

		.headertop {
			width: 100%;
			position: fixed;
			top: 0%;
			overflow: hidden;
			transition: 0.5s;
			z-index: 9999;

			.topdaohang {
				width: 100%;
				display: flex;
				align-items: center;
				justify-content: center;
				font-weight: 500;
				font-size: 34rpx;
				color: #FFFFFF;
			}
		}

		.loop {
			width: 100%;
			overflow: hidden;
			position: absolute;
			z-index: 0;

		}

		.bottomcontent {
			width: 100%;
			border-radius: 40rpx 40rpx 0rpx 0rpx;
			overflow: hidden;
			margin-top: 420rpx;
			position: relative;
			z-index: 999;



			.bottomcontentback {
				width: 100%;
				position: absolute;
				z-index: -1;
			}

			.xuanqunriong {
				width: 100%;
				background: #FFFFFF;
				position: absolute;
				z-index: 99999;
				overflow: hidden;
				border-radius: 0 0 48rpx 48rpx;

				.diquboxs {
					width: 100%;
					height: 540rpx;
					overflow: hidden;
					display: flex;
					margin-top: 10rpx;

					.qu {
						width: 312rpx;
						height: 540rpx;
						background: #F7F8FA;
						overflow-y: scroll;

						.qubox1 {
							width: 100%;
							display: flex;
							align-items: center;
							height: 92rpx;
							font-weight: 400;
							font-size: 28rpx;
							color: #1D2129;
							position: relative;

							.duihaoicon {
								width: 36rpx;
								height: 36rpx;
								position: absolute;
								right: 40rpx;
							}
						}

						.qubox {
							font-weight: 400;
							font-size: 28rpx;
							color: #1D2129;
							width: 100%;
							display: flex;
							align-items: center;
							height: 92rpx;
						}
					}

					.shi {
						width: 224rpx;
						height: 540rpx;
						background: #F7F8FA;
						border-left: 2rpx solid #E5E6EB;
						border-right: 2rpx solid #E5E6EB;
						overflow-y: scroll;

						.shibox1 {
							width: 214rpx;
							height: 92rpx;
							border-radius: 0rpx 0rpx 0rpx 0rpx;
							text-align: center;
							line-height: 92rpx;
							font-family: PingFang SC, PingFang SC;
							font-weight: 400;
							font-size: 28rpx;
							color: #13A2E6;
						}

						.shibox {
							width: 214rpx;
							height: 92rpx;
							border-radius: 0rpx 0rpx 0rpx 0rpx;
							text-align: center;
							line-height: 92rpx;
							font-family: PingFang SC, PingFang SC;
							font-weight: 400;
							font-size: 28rpx;
							color: #1D2129;
						}
					}

					.shengs {
						width: 214rpx;
						height: 540rpx;
						overflow-y: scroll;

						.sbox {
							width: 214rpx;
							height: 92rpx;
							background: #fff;
							border-radius: 0rpx 0rpx 0rpx 0rpx;
							text-align: center;
							line-height: 92rpx;
							font-family: PingFang SC, PingFang SC;
							font-weight: 400;
							font-size: 28rpx;
							color: #1D2129;
						}

						.sbox1 {
							width: 214rpx;
							height: 92rpx;
							background: #F7F8FA;
							border-radius: 0rpx 0rpx 0rpx 0rpx;
							text-align: center;
							line-height: 92rpx;
							font-family: PingFang SC, PingFang SC;
							font-weight: 400;
							font-size: 28rpx;
							color: #13A2E6;
						}
					}
				}

				.mianjimokuai {
					width: 686rpx;
					overflow: hidden;
					margin: auto;
					margin-top: 52rpx;

					.title {
						font-family: PingFang SC, PingFang SC;
						font-weight: bold;
						font-size: 32rpx;
						color: #1D2129;
					}

					.activeboxs .itemactivebox:nth-child(3n) {
						margin-right: 0rpx !important;
					}

					.activeboxs {
						width: 686rpx;
						margin-top: 18rpx;
						display: flex;
						flex-wrap: wrap;
						height: 160rpx;
						overflow-y: scroll;

						.activeColor1 {
							background: #13A2E6 !important;
							color: #FFFFFF !important;
						}

						.itemactivebox {
							width: 214rpx;
							height: 68rpx;
							font-size: 24rpx;
							color: #4E5969;
							text-align: center;
							background: #F2F3F5;
							border-radius: 8rpx 8rpx 8rpx 8rpx;
							line-height: 68rpx;
							margin-right: 22rpx;
							margin-bottom: 20rpx;
							overflow: hidden;
						}
					}
				}

				.btnss {
					width: 100%;
					height: 96rpx;
					display: flex;
					align-items: center;
					margin-top: 28rpx;

					.btnb {
						width: 375rpx;
						height: 96rpx;
						background: #F2F3F5;
						border-radius: 0rpx 0rpx 0rpx 48rpx;
						text-align: center;
						line-height: 96rpx;
						font-family: PingFang SC, PingFang SC;
						font-weight: 500;
						font-size: 32rpx;
						color: #86909C;
					}

					.btnbb {
						width: 375rpx;
						height: 96rpx;
						background: #13A2E6;
						border-radius: 0rpx 0rpx 48rpx 0rpx;
						text-align: center;
						line-height: 96rpx;
						font-family: PingFang SC, PingFang SC;
						font-weight: 500;
						font-size: 32rpx;
						color: #FFFFFF;
					}
				}

				.mkboxs {
					width: 686rpx;
					margin: auto;
					margin-top: 60rpx;
					display: flex;
					align-items: center;
					justify-content: space-between;

					.activeColor {
						background: #13A2E6 !important;
						color: #FFFFFF !important;
					}

					.itembb {
						width: 148rpx;
						height: 66rpx;
						background: #F2F3F5;
						border-radius: 8rpx 8rpx 8rpx 8rpx;
						text-align: center;
						line-height: 66rpx;
						font-family: PingFang SC, PingFang SC;
						font-weight: 400;
						font-size: 24rpx;
						color: #4E5969;
						margin-right: 30rpx;
					}
				}
			}

			.center {
				width: 686rpx;
				margin: auto;
				margin-top: 28rpx;
				overflow: hidden;

				.contents {
					width: 686rpx;
					overflow: hidden;
					min-height: 500rpx;

					.mkbox1 {
						width: 100%;
						height: 240rpx;
						background: #F7F8FA;
						border-radius: 16rpx 16rpx 16rpx 16rpx;
						display: flex;
						align-items: center;
						margin-bottom: 24rpx;

						.imgleft {
							width: 200rpx;
							height: 200rpx;
							border-radius: 12rpx 12rpx 12rpx 12rpx;
							margin-left: 20rpx;
						}

						.rightcontent {
							margin-left: 16rpx;
							width: 430rpx;

							.t1 {
								width: 100%;
								font-family: PingFang SC, PingFang SC;
								font-weight: bold;
								font-size: 28rpx;
								color: #1D2129;
								text-overflow: ellipsis;
								overflow: hidden;
								white-space: nowrap;
							}

							.t2 {
								font-family: PingFang SC, PingFang SC;
								font-weight: 400;
								font-size: 26rpx;
								color: #4E5969;
								width: 100%;
								text-overflow: ellipsis;
								overflow: hidden;
								white-space: nowrap;
								margin-top: 6rpx;
							}

							.jiageline {
								font-family: PingFang SC, PingFang SC;
								font-weight: 400;
								font-size: 24rpx;
								color: #86909C;
							}

							.cityline {
								width: 100%;
								display: flex;
								align-items: center;
								font-family: PingFang SC, PingFang SC;
								font-weight: 400;
								font-size: 24rpx;
								color: #86909C;
								margin-top: 6rpx;

								.smallicon {
									width: 24rpx;
									height: 24rpx;
								}

								.addresst {
									display: -webkit-box;
									/* 必须设置，用于多行溢出 */
									-webkit-box-orient: vertical;
									/* 设置盒子排列方向为垂直 */
									-webkit-line-clamp: 2;
									/* 限制显示的行数，例如显示 3 行 */
									overflow: hidden;
									/* 隐藏超出的内容 */

									width: 400rpx;
								}
							}

							.fenleik {
								width: 100%;
								display: flex;
								align-items: center;
								margin-top: 6rpx;

								.itekuai {
									width: 96rpx;
									height: 36rpx;
									background: #E5E6EB;
									border-radius: 4rpx 4rpx 4rpx 4rpx;
									text-align: center;
									line-height: 36rpx;
									font-family: PingFang SC, PingFang SC;
									font-weight: 400;
									font-size: 24rpx;
									color: #86909C;
									margin-right: 20rpx;
								}
							}
						}
					}
				}



				.fenleiclassify {
					width: 100%;
					display: flex;
					justify-content: space-between;
					align-items: center;
					margin-top: 24rpx;

					.flitem {
						display: flex;
						align-items: center;
						font-family: PingFang SC, PingFang SC;
						font-weight: 500;
						font-size: 28rpx;
						color: #1D2129;

						image {
							width: 20rpx;
							height: 12rpx;
							margin-left: 8rpx;
						}
					}
				}

				.seachbox {
					width: 100%;
					height: 76rpx;
					display: flex;
					align-items: center;
					margin-top: 16rpx;
					background: #F7F8FA;
					border-radius: 16rpx 16rpx 16rpx 16rpx;

					.iconrem {
						position: absolute;

						position: absolute;
						width: 40rpx;
						height: 40rpx;
						right: 30rpx;
					}

					.ssicon {
						width: 32rpx;
						height: 32rpx;
						margin-left: 24rpx;
					}

					input {
						font-family: PingFang SC, PingFang SC;
						font-weight: 400;
						font-size: 28rpx;
						margin-left: 12rpx;
					}
				}

				.fenleiarr {
					width: 100%;
					white-space: nowrap;
					overflow-x: scroll;

					.itembox {
						display: inline-block;
						width: 112rpx;
						margin-right: 32rpx;

						.image1 {
							width: 96rpx;
							height: 96rpx;
							margin: auto;
							display: block;
						}

						.mkbox {
							min-width: 112rpx;
							height: 52.6rpx;
							overflow: hidden;

							.mk {
								width: 100%;
								height: 44rpx;
								background: #F2F3F5;
								border-radius: 8rpx 8rpx 8rpx 8rpx;
								text-align: center;
								line-height: 44rpx;
								font-size: 24rpx;
								color: #1D2129;
								overflow: hidden;
							}
						}


						.mkactive {
							min-width: 112rpx;
							height: 52.6rpx;
							position: relative;
							overflow: hidden;

							.mkactiveback {
								position: absolute;
								width: 100%;
								z-index: -1;
							}

							.mkt {
								width: 100%;
								height: 52.6rpx;
								font-family: PingFang SC, PingFang SC;
								font-weight: 500;
								font-size: 28rpx;
								color: #23ACED;
								text-align: center;
								line-height: 52.6rpx;
							}
						}
					}
				}
			}
		}

		::v-deep .u-swiper__indicator {
			bottom: 128rpx !important;
		}

		.indicator {
			@include flex(row);
			justify-content: center;

			&__dot {
				width: 20rpx;
				height: 8rpx;
				border-radius: 24rpx 24rpx 24rpx 24rpx;
				background: rgba(255, 255, 255, 0.38);
				margin: 0 2px;
				transition: background-color 0.3s;

				&--active {
					width: 36rpx;
					height: 8rpx;
					background-color: #FFFFFF;
				}
			}
		}

		.indicator-num {
			padding: 2px 0;
			background-color: rgba(0, 0, 0, 0.35);
			border-radius: 100px;
			width: 35px;
			@include flex;
			justify-content: center;

			&__text {
				color: #FFFFFF;
				font-size: 12px;
			}
		}

	}
</style>